package com.mobile.widget;

import com.mobile.aide.ui.R;

import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.BaseAdapter;
import android.widget.LinearLayout;
import android.widget.ListView;

public class PushSmsReceiverBaseLayout<T extends BaseAdapter> extends LinearLayout{
	Context          		 mContext;
	ListView 				 mAppListView;
	T						 mAdapter;
	int                      mListViewId;
	public PushSmsReceiverBaseLayout(Context context) {
		super(context);
	}
	
	public PushSmsReceiverBaseLayout(Context context,
									 AttributeSet attrs) {
		super(context, attrs);
	}
	
	public void setAdapter(T adapter) {
		mAdapter = adapter;
	}
	
	public void setListViewId(int id) {
		mListViewId = id;
	}
	
	public void init() {
		mAppListView = (ListView)findViewById(R.id.show_app_list);
		mAppListView.setAdapter(mAdapter);
		mAppListView.setDivider(new ColorDrawable(Color.TRANSPARENT));
	}
	
	public LinearLayout getLayout() {
		return this;
	}
}
